<?php
if ( !defined( "IN_OP" ) )
{
    exit( "You can't access this file directly..." );
}
$newstr = "";
$news_add = nl2br( trim( $conf->Get( "news_th" ) ) );
$newstr .= $news_add == "" ? "<tr><td></td><td></td></tr>" : "<tr><th class='red' nowrap style='font-size:0.95em;'>系统重大公告</th><td  style='font-size:0.95em;font-weight:900' class='td2' colspan='2' style='word-wrap: break-word; word-break: normal;'>{$news_add}</td></tr>";
$gametype = 0;
if ( $g_init_mode_6h )
{
    $newstr .= "<tr class='td2'><th class='paper6h'>六合彩</th>";
    $news_add = nl2br( trim( $conf->Get( "news_en" ) ) );
    $newstr .= "<td style='word-wrap: break-word; word-break: normal;'><a name='0'></a>{$news_add}</td>";
    $news_add = nl2br( trim( $conf->Get( "news" ) ) );
    $newstr .= "<td style='word-wrap: break-word; word-break: normal;'>{$news_add}</td>";
    $newstr .= "</tr>";
}
if ( $g_init_mode_3d )
{
    $i = 1;
    while ( $i <= 26 )
    {
        if ( isset( $g_menu_enabled[$i] ) && $g_menu_enabled[$i] )
        {
            $gametype = $i;
            $enTemp = $g_gametype_3d[$i]['en'];
            $chTemp = $g_gametype_3d[$i]['ch'];
            $newstr .= "<tr class='td2'><th class='paper{$enTemp}'>{$chTemp}</th>";
            $news_add = trim( $conf->Get( "news_th_{$enTemp}" ) );
            $newstr .= $news_add == "" ? "<td><a name='{$i}'></a> -- </td>" : "<td width='50%' valign='top' id='memnew2' style='word-wrap: break-word; word-break: normal;'><a name='{$i}'></a>{$news_add}</td>";
            $news_add = nl2br( trim( $conf->Get( "news_{$enTemp}" ) ) );
            $newstr .= "<td width='50%' valign='top' id='memnew1' style='word-wrap: break-word; word-break: normal;'>{$news_add}</td>";
            $newstr .= "</tr>";
        }
        ++$i;
    }
}
$color = $conf->Get( "newsClc" );
$color = $color ? $color : "red";
$ui = new UI_3D( true );
$ui->header();
echo "<style> fieldset{width:700px;} legend , div{padding:3px;} .tblMy3D td{ padding:10px; } th{font-size:12px;} </style>";
echo "<table class=\"tblMy3D\" width=\"900\" style=\"word-wrap: break-word; word-break: normal;\">";
echo "<caption class=\"paperAll\">公告</caption>";
echo "<tr class=\"td6\"><th width=\"150\">类别</th><th>管理层公告</th><th>会员公告</th></tr>";
echo $newstr;
echo "</table>";
echo "<script>";
echo "function reMyTag(oObj){";
echo "  var str = oObj.innerHTML;";
echo "  str = str.replace(/\\133/g, \"<strong style=color:".$color.">\");";
echo "  str = str.replace(/\\135/g, \"</strong>\");";
echo "  oObj.innerHTML = str;";
echo "}";
echo "reMyTag(document.getElementById(\"memnew1\"));";
echo "</script>";
$ui->footer();
?>